import http from "../uitls/http.js";

// 获取用户的书架
export const getBookcaseAPI = () => {
  return http({
    url: `/bookcase`,
    method:'get',
  })
}

// 新增用户的书架 id:小说id
export const postBookcaseAPI = (bookcase) => {
  return http({
    url: `/bookcase`,
    method:'post',
    data:bookcase,
  })
}

// 删除用户的书架 id:小说id
export const delBookcaseAPI = (id) => {
  return http({
    url: `/bookcase/${id}`,
    method:'delete',
  })
}

// 修改用户的书架 id:小说id 通常是用户浏览到小说的最新章节
export const putBookcaseAPI = (bookcase) => {
  return http({
    url: `/bookcase`,
    method:'put',
    data: bookcase
  })
}

